package org.ybxb.okhttp;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;

import org.junit.jupiter.api.Test;

import com.deepoove.poi.XWPFTemplate;

/**
 * @ProjectName: generator-report
 * @PackageName: org.ybxb.gr
 * @Description:
 * @Author: hy.bai
 * @Date: 2025-07-09 13:59
 */
public class PoiTlDemo {

  @Test
  public void testExportWord() throws IOException {
    HashMap<String, Object> dataModel = new HashMap<>();
    dataModel.put("title", "Hi, poi-tl Word模板引擎");
    XWPFTemplate template = XWPFTemplate.compile("G://abc.docx").render(dataModel);
    template.writeAndClose(new FileOutputStream("G://output.docx"));
  }

}
